package com.text.day3_2;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class ArtText {
    public static void main(String[] args) throws FileNotFoundException {
        List<ArtShow> list = new ArrayList<>();

        String filePath = "D:\\txt\\java\\java2306\\code\\java2306\\src\\com\\text\\day3_2\\artshow.txt";
        //只能绝对位置
        File file = new File(filePath);
        Scanner scanner = new Scanner(file);

        while (scanner.hasNext()) {
            String line = scanner.nextLine();
            String[] str = line.split("\t");  //制表符分割
            list.add(new ArtShow(str[0],str[1],Integer.valueOf(str[2]),Integer.valueOf(str[3])));



        }
//        System.out.println(list);

        for (ArtShow artShow : list) {
            System.out.println(artShow);
        }
    }
}
